Rule generation model building

ABSTRACT

A database management system provides the capability to perform cluster analysis and provides improved performance in model building and data mining, good integration with the various databases throughout the enterprise, and flexible specification and adjustment of the models being built, but which provides data mining functionality that is accessible to users having limited data mining expertise and which provides reductions in development times and costs for data mining projects. The database management system for in-database clustering comprises a first data table and a second data table, each data table including a plurality of rows of data, means for building a clustering model using the first data table, means for building a rule-based model using the clustering model, and means for applying the rule-based model using the second data table to generate apply output data.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] The benefit under 35 U.S.C. § 119(e) of provisional applicationNo. 60/379,118, filed May 10, 2002, is hereby claimed.

FIELD OF THE INVENTION

[0002] The present invention relates to a system, method and computerprogram product for performing in-database clustering for data mining.

BACKGROUND OF THE INVENTION

[0003] Data mining is a technique by which hidden patterns may be foundin a group of data. True data mining doesn't just change thepresentation of data, but actually discovers previously unknownrelationships among the data. Data mining is typically implemented assoftware in or in association with database systems. Data miningincludes several major steps. Data mining models are “trained” byprocessing training data and generating information that defines themodel. The generated information is then deployed for use in datamining, for example, by providing predictions of future behavior basedon specific past behavior.

[0004] Clustering, along with classification, regression, and marketbasket analysis, is one of the major data mining tasks. Clustering is auseful technique for exploring and visualizing data. It is particularlyhelpful in situations where one has many records of data and no ideawhat natural groupings might be present in the data. Ideally, one wouldlike the data mining software to find whatever natural groupings mayexist. Clustering also serves as a useful data-preprocessing step toidentify homogeneous groups on which to build predictive models such astrees or neural networks. A clustering model is different frompredictive models in that the outcome of the process is not guided by aknown result, that is, there is no target variable. Predictive modelspredict values for a target variable, and an error rate between thetarget and predicted values can be calculated to guide model building.With clustering models, the data density itself drives the process to afinal solution.

[0005] Typically, conventional data mining systems work in conjunctionwith a database management system, transferring data to be mined fromthe database management system to the data mining system for processing.As a result, these current systems tend to provide inadequateperformance for large datasets. In addition, typically, a wide varietyof models must be generated to meet specific, but widely different needsthroughout an enterprise. A typical enterprise has a variety ofdifferent databases from which data is drawn in order to build themodels. Current systems do not provide adequate integration with thevarious databases throughout the enterprise. Likewise, current systemsprovide limited flexibility in terms of specifying and adjusting thedata mining to be performed to meet specific needs. In addition, a highlevel of expertise is typically required of a data mining user in orderto actually perform useful data mining work. This high expertiserequirement has led to a slow rate of adoption of data miningtechnology, as well as increased development times and costs for thosewho have adopted data mining technology.

[0006] A need arises for a technique by which cluster analysis may beperformed that provides improved performance in model building and datamining, good integration with the various databases throughout theenterprise, and flexible specification and adjustment of the modelsbeing built, but which provides data mining functionality that isaccessible to users having limited data mining expertise and whichprovides reductions in development times and costs for data miningprojects.

SUMMARY OF THE INVENTION

[0007] The present invention provides the capability to perform clusteranalysis and provides improved performance in model building and datamining, good integration with the various databases throughout theenterprise, and flexible specification and adjustment of the modelsbeing built, but which provides data mining functionality that isaccessible to users having limited data mining expertise and whichprovides reductions in development times and costs for data miningprojects.

[0008] In one embodiment of the present invention, a database managementsystem for in-database clustering comprises a first data table and asecond data table, each data table including a plurality of rows ofdata, means for building a clustering model using the first data table,means for building a rule-based model using the clustering model, andmeans for applying the rule-based model using the second data table togenerate apply output data. The means for building the rule-based modelmay comprise means for retrieving cluster data relating to a pluralityof clusters, means for computing a number of non-zero bins for eachattribute histogram and obtaining a number of records in a root cluster,means for generating a rule antecedent element for each cluster of theplurality of clusters, means for computing a rule record count, andmeans for storing rule information. The means for generating a ruleantecedent element for each cluster of the plurality of clusters maycomprise means for obtaining a number of records Cc assigned to thecluster and means for, for each attribute and associated attributehistogram, computing a histogram height, computing a background level ofthe attribute histogram, computing a number of bins, a sum of the bins,and an attribute relevance, and generating a rule antecedent element forthe attribute. The means for computing a histogram height may comprisemeans for computing an average histogram height for non-zero binsH=Hs/B, where B is a number of non-zero bins and Hs is a sum of heightsof histograms of the non-zero bins. The means for computing a backgroundlevel of the attribute histogram may comprise means for computing thebackground level β for the attribute histogram according to$\beta = \left\{ \begin{matrix}{1 - s} & {B = 0} \\\frac{\left( {1 - s} \right){\max \left( {1,{H - \sqrt{H - \chi^{2}}}} \right)}}{Cc} & {B > 0}\end{matrix} \right.$

[0009] wherein s is the sensitivity parameter.

[0010] The means for computing a number of bins, a sum of the bins, andan attribute relevance may comprise means for computing a number of binsB_(p) having a height greater than the background level β, means forcomputing the sum of the bins Hp with height above β, and means forcomputing the attribute relevance AR according to:${AR} = \left\{ {\begin{matrix}0 & {{Br} = 0} \\{1 - \frac{Bp}{Br}} & {{Br} > 0}\end{matrix},} \right.$

[0011] wherein Br is a number of non-zero bins in a histogram of theroot node or the histogram of the attribute. The means for generating arule antecedent element for the attribute may comprise means forgenerating a predicate containing a list of all bins having a heightgreater than β, if the attribute is categorical and means for generatinga predicate encoding a range of bins having a height greater than β, ifthe attribute is non-categorical.

BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The details of the present invention, both as to its structureand operation, can best be understood by referring to the accompanyingdrawings, in which like reference numbers and designations refer to likeelements.

[0013]FIG. 1a is an exemplary diagram showing a two-dimensionaldistribution of input data.

[0014]FIG. 1b is an exemplary diagram showing a two-dimensionaldistribution of input data in bin-space where each attribute has beenbinned.

[0015]FIG. 2 is an exemplary table listing coordinates for estimatedcluster centers.

[0016]FIG. 3 is an exemplary diagram showing compression achieved byusing only one entry in the buffer per cell in bin-space.

[0017]FIG. 4a is an exemplary diagram showing a compressed buffer.

[0018]FIG. 4b is an exemplary diagram showing a compressed buffer.

[0019]FIG. 5 is an exemplary table illustrating results of applyingK-Means to the distribution shown in FIG. 3 with different buffer sizes.

[0020]FIG. 6 is an exemplary diagram illustrating centroids of clustersestimated using K-Means.

[0021]FIG. 7 is an exemplary diagram illustrating a clustering buildtask framework.

[0022]FIG. 8 is an exemplary diagram illustrating a clustering applytask framework.

[0023]FIG. 9 is an exemplary flow diagram illustrating a core K-Meansprocess.

[0024]FIG. 10 is an exemplary flow diagram illustrating hierarchicalK-Means process.

[0025]FIG. 11 is an exemplary flow diagram illustrating an O-Clusterprocess.

[0026]FIG. 12 is an exemplary flow diagram illustrating a rulegeneration process.

[0027]FIG. 13 is an exemplary flow diagram illustrating a probabilisticmodel generation process.

[0028]FIG. 14 is an exemplary block diagram of a data mining system, inwhich the present invention may be implemented.

[0029]FIG. 15 is an exemplary illustration of numeric attributesplitting points identified in a one dimensional histogram.

[0030]FIG. 16 is an exemplary illustration of a categorical attributehistogram.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Concepts

[0031] Clustering

[0032] A general view of clustering places it in the framework ofdensity estimation. From this perspective, clustering can be viewed asidentifying the dense regions in the input data or finding components(which can overlap) of the density function that when combined provide agood approximation of the original density function. For example, aGaussian-mixture clustering model attempts to find a set of(overlapping) Gaussian components that approximate well the targetdensity function. These components implicitly partition the space intoregions where the contribution of a single component dominates. It iscommon, in this context, to identify each component as a cluster. Forcases where the density function is not a mixture of Gaussian componentsthe mapping of components to clusters breaks down, even though themixture model still approximate the density very well.

[0033] Clustering can be defined as finding a set (usually small) ofcomponents of the density function that provide a good approximation(summary) of the density. If the components overlap (mix) then we havesoft assignment of data points to clusters (e.g., probabilistic or fuzzyclustering). If the clusters are organized into a hierarchical structurethen clustering implicitly defines a taxonomy for the data.

[0034] Clustering in Bin-space

[0035] The processes utilized by the present invention may work withbinned or unbinned data. FIG. 1a shows a two-dimensional distribution ofunbinned data, while FIG. 1b shows a distribution of the same data inbin-space where each attribute has been binned into 30 bins. Each cellin the bin-space representation contains many of the original datapoints. It also shows the centers (circles) of the clusters computedusing the K-Means algorithm. The coordinates for the estimated clustercenters are listed in the exemplary table shown in FIG. 2.

[0036] Hierarchical Partitioning of the Data

[0037] A quick way of approximating the input density function is tobuild a hierarchical partitioning of the data using a kd-tree. Each leafof the tree will own a subset of the input data points. There are manyadvantages in constructing a tree representation of the density, to lista few:

[0038] It is inexpensive to construct and can be used for supportingmany complex algorithms, such as Bayesian or probabilistic models.

[0039] It provides a coarse taxonomy of the input data.

[0040] It can significantly speed up building clustering models. It isvery expensive to run distance-based clustering algorithms in largedatasets with many attributes. The tree provides a summary of thedensity that can be used to train clustering algorithms instead of usingthe original data. Fewer points translate into faster training.

[0041] It introduces a gradual form of dimensionality reduction. Insteadof the global feature selection commonly used this is a local featureselection. Attributes that are not relevant for some areas of the inputspace become very infrequent. The tree decimates the data very quicklyand many attributes become irrelevant in each partition.

[0042] Building a Tree to Summarize the Density

[0043] While building a tree the data for storing the tree is kept inmemory in a buffer. Each entry in the buffer is assigned to as singleleaf node in the tree. Each entry has also a count associated with it.Because the tree works with binned data many input data points will havethe same coordinates in bin-space and can be represented by a singleentry in the buffer. This provides a natural summary of the data andsome compression. FIG. 3 shows the compression achieved by using onlyone entry in the buffer per cell in bin-space. Only 333 cells, out of900 possible, are needed to summarize the initial 2000 points in FIG.1a. However, for sparse data this scheme alone won't achieve muchcompression of the input data. The following strategy is used to buildthe tree:

[0044] Read the data for a caseId from the input source.

[0045] Find the leaf to which the caseId belongs.

[0046] Search amongst the entries in the buffer assigned to the winningleaf for the coordinates of the current data point:

[0047] If the data point already exist increase the count for the datapoint in the buffer,

[0048] Otherwise add a new entry to the buffer for the current datapoint with a count of one.

[0049] When a caseId is assigned to a node the histograms kept at thenode for each attribute are updated.

[0050] When the number of entries assigned to a node reaches apre-specified threshold the node is split and its buffer entries dividedamong its child nodes. The node is split along the attribute with thehighest entropy. For high cardinality attributes we can split on the topK most frequent values and bundle the rest in an Others partition.

[0051] If the buffer fills up no more data is read into the tree.

[0052] After the buffer is filled up or all the data is read into thetree, it is still possible to continue growing the tree by using asmaller threshold to control splitting.

[0053] The use of a kd-tree in clustering has already been proposed. Theapproach proposed here is different from that work in that it usesbinned or unbinned data, introduces data compression while building thetree, and it splits on all values of a given attribute simultaneously.

[0054] Scaling to Large Datasets with Buffer Compression

[0055] Although the tree construction described in the previous sectionalready provides some degree of data compression that scheme works wellonly if the data is dense. When the data is sparse each unique cell inthe grid will have very few points. However there might be manysubspaces, which are dense. This fact can be used to achieve furthercompression of the data by combining multiple cells in the buffer in asingle entry or summary. This can be implemented during the treeconstruction step by defining a cell as the hypercube defined by B binsalong each dimension. The parameter B controls the degree ofcompression. The tree construction scheme described in the previoussection assumed B=1.

[0056]FIGS. 4a and 4 b shows the impact of buffer compression on therepresentation of the density. The uncompressed buffer (FIG. 3) has 333entries. For this example there is one leaf for each value of thehorizontal attribute A1. FIG. 4a displays the buffer for one level ofcompression. After compression the buffer has 27 entries (three A1 binshave zero data). FIG. 4b displays the buffer for another level ofcompression. In this case the buffer has 71 entries.

[0057] The method described above is an innovative approach that shouldbe faster and more efficient than conventional approaches. It can alsoeasily handle mixed data, which is not addressed by conventionalapproaches.

[0058] Clustering with Summaries

[0059] For many applications the partition of the input data provided bythe kd-tree described above is sufficient. However, other applicationsrequire more sophisticated clustering algorithms. As discussed in theprevious section, buffer compression provides the means to scale densitysummarization to large datasets with limited memory while performing asingle scan of the input table. The summaries created by compressing thebuffer can then be used to train a variety of clustering models (e.g.,K-Means, and mixture models).

[0060] Clustering models may be trained in a variety of ways. Forexample:

[0061] K-means models may be trained by creating the tree and thenrunning the clustering model on the statistics stored in the leaves.

[0062] Other types of models may be trained by reading a portion of thedataset and building the tree using that data. The clustering model istrained using the data. More data is then read and the models aretrained using that data. However, not all the data is used to train themodel. Rather, active sampling is performed in which areas of the modelthat would be improved by additional training are determined. Only datathat relates to those areas of the model are used to performedadditional training. Data that relates to areas of the model that wouldnot be improved by additional training is not used to train the model.The process is repeated until either all the rows in the dataset havebeen read or the buffer cannot receive more data.

[0063] The above two strategies can be used to scale a variety ofclustering algorithms to handle large datasets with a large number ofattributes. The first of the above two strategies is exemplified belowfor K-Means, K- and mixture models. The second strategy is exemplifiedlater on by O-Cluster.

[0064] The hierarchical nature of the buffer can also be used to furtherspeed up the training of clustering models. This is especially usefulfor training incremental models where the number of clusters isgradually increased.

[0065] K-Means

[0066] K-Means has two steps:

[0067] Assign data points to clusters. That is, assign each of the rowsin the buffer to the nearest cluster.

[0068] Update the centroids (the weight vector associated with eachcluster)

[0069] The assignment step requires computing a distance metric tocompute the distance between an input and each of the centroids. Thedistance metric most used is the Euclidean metric:${{d_{j}^{n}(I)} = {\sum\limits_{i}\quad {d_{ij}^{n}(I)}}},{{{where}\quad {d_{ij}^{n}(I)}} = \left( {I_{i} - W_{i}^{j}} \right)^{2}},$

[0070] where d_(j) ^(n)(I) is the distance between input I and thej^(th) centroid, i indexes the input attributes, and W_(i) ^(j) is thei^(th) coordinate of the j^(th) centroid. The update of the centroids isdone by replacing the current centroid by the mean of the data pointsassigned to the cluster:${W_{i}^{j} = \frac{\sum\limits_{l = 1}^{A^{j}}\quad A_{li}^{j}}{A^{j}}},$

[0071] where A^(j) is the set of data points assigned to cluster j andA_(l) ^(j) is the is the i^(th) attribute of the point A_(l) ^(j) inA^(j). When working with summaries, each data point contributes with adifferent weight to the computation of the new centroid. The modifiedformula becomes:${W_{i}^{j} = \frac{\sum\limits_{l = 1}^{A^{j}}\quad {C_{l}^{j}A_{li}^{j}}}{\sum\limits_{l = 1}^{A^{j}}\quad C_{l}^{j}}},$

[0072] where A^(j) is the set of summaries and points assigned tocluster j,C_(l) ^(j) is the number of points in summary or point A_(l)^(j).

[0073] The results of applying K-Means to the distribution in FIG. 3with a different buffer are illustrated in the exemplary table shown inFIG. 5. The coordinates for the centroids have to be transformed back tothe original scale.

[0074] Mixture Models (EM)

[0075] Mixture models attempt to approximate an input density with afixed number of components density distributions. The number and thetypes of the component distributions are specified beforehand. Trainingof this type of model usually uses the EM algorithm. This is aniterative process that has two main steps:

[0076] Assign data points to components according to the probabilitythey belong to the component distributions.

[0077] Update the parameters of the component distributions using thepoints assigned to the component.

[0078] When working with summaries, the summaries are assigned to thecomponents according to the probability that they belong to eachcomponent. A summary contributes to the update of the parameters of eachcomponent according to the product of the summary's count and theprobability of belonging to the distribution.

[0079] Cluster Description and Interpretability

[0080] The hierarchical partition described above provides a summary ofthe input distribution that can be described by rules of the type:

Age>=20 AND Age<=30 AND Color IN {‘red’, ‘yellow’}→C1

[0081] where Age and Color are attributes and C1 is a cluster index orlabel

[0082] It is possible to extract rules of the type described above forclusters uncovered by a clustering model. In this case each cluster willhave a histogram associated with it. Using these histograms we canextract a hyperbox that captures most of the data associated with thatcluster. Hyperboxes have the nice feature that they can be described bya set of rules. For numeric attributes the hyperbox is defined aroundthe mean. For categorical attributes the hyperbox includes the attributevalues with the largest counts so that the sum of their counts accountsfor a large percentage of the total count for the cluster. This isillustrated in FIG. 6 where the centroids of the two clusters wereestimated using K-Means. The histograms on the right side are used todefine the hyperboxes (darker squares) on the left side of the figure.The two hyperboxes are captured by the following rules:

A1<8 AND A2<7 −>C1

A1>4 AND A2>3 −>C2

[0083] Other pieces of helpful information for complementing thedescription of each cluster are:

[0084] The distribution of values for each attribute (the histograms)

[0085] The mean and mode of these distributions.

[0086] Probabilistic Models

[0087] The histograms on the leaves of the tree partitioning describedabove can be used to define a collection of local Naive Bayes models,one per leaf. These models can be easily persisted in tables and scoredusing the same scoring queries as those used by Naive Bayes modeling.The combination of these Naive Bayes models constitutes a BayesianNetwork approximation of the input density function that can be used ina variety of modeling tasks. For example, it can be used to generaterules on the fly of which products are most correlated with a givenbasket of products. It can also treat both presence and absence ofinformation.

[0088] The estimate of the density using the histograms at the leaflevel may have very high variance due to the lack of enough data at theleaves. To minimize this we can use data shrinkage to interpolate thehistograms using the counts at the higher levels to reduce the varianceat the leaf level. This approach would make it possible to generalizeacross tree boundaries.

[0089] It is also possible to build probabilistic models by trainingmore sophisticated models, such as EM-based mixture models, on the datasummary created by the tree partitioning scheme.

[0090] Support to Supervised Models

[0091] The concepts described in the previous sections can also beeasily adapted to implement fast algorithms for creating a variety ofsupervised models, for example:

[0092] Bayesian networks

[0093] KNN

[0094] Radial basis functions

[0095] Wavelet networks

[0096] Concepts

[0097] The present invention provides a number of advantages, such as:

[0098] 1. A special hierarchical approximation of the data that usesbinned or unbinned data and offers natural compression of the data.

[0099] 2. A novel fast data summarization approach to scale clusteringalgorithms to large datasets.

[0100] 3. Clustering using a hierarchical approximation of the data.

[0101] 4. Novel implementations of many traditional clustering models:

[0102] K-Means

[0103] Mixture models (EM)

[0104] 5. Novel cluster description technique.

[0105] 6. Novel approach to create Bayesian networks.

Exemplary Software Modules Design

[0106] An example of a clustering build task framework is shown in FIG.8a. An example of a clustering apply task framework is shown in FIG. 8b.

[0107] K-Means Build Module

[0108] Description

[0109] Builds a center-based clustering model using the K-Meansalgorithm. The K-Means algorithm is suitable for numerical data. Theproduced model is hierarchical and represents a binary tree.

[0110] If the number of rows in the training dataset is greater than theK-Means buffer size, the build module initially invokes the datasummarization module. Subsequently, it invokes the K-Means hierarchicalmodule that in turn calls repeatedly the K-Means core module.

[0111] After the actual clustering the build module calls the generaterules and generate probabilistic model modules to generate the set ofrules associated with the clustering model and the Naive Bayes modelused for scoring.

[0112] If summarization is engaged it is necessary to extract therelevant information produced by the data summarization step. ForK-Means, it is necessary to extract the mean value of each attribute.

[0113] K-Means Core Module

[0114] An exemplary flow diagram of a core K-Means process 900 is shownin FIG. 9. Process 900 begins with step 902, in which the centroids ofthe clusters are initialized. The centroids should be seeded with thecentroid of all points to be partitioned (that is, the centroid of theparent cluster). To break the symmetry, an attribute needs to beperturbed. Select the attribute with highest variance. K-Means workswith continuous attributes. The present algorithm assumes that the dataare always partitioned into two clusters at a time. Therefore, one ofthe clusters can be seeded with the parent centroid. The other clustershould be perturbed on the attribute with maximum variance. The selectedattribute should be perturbed by adding a small value (epsilon).

[0115] In step 904, for each record, the closest cluster to the data inthe record is found. Step 904 includes sub-steps 904A-C. In sub-step904A, the Euclidean distance between each record and each centroid iscomputed and a winning cluster for each record is selected. In step904B, a dispersion for each cluster (average distance of cluster membersto centroid) is computed. In step 904C, a total error (sum of distancebetween each record and cluster center) is computed.

[0116] In step 906, cluster centroids and histograms are updated on thebasis of new record assignments. In step 907, if the maximum number ofiterations is reached, process 900 exits. Otherwise, process 900continues with step 908, in which, if error tolerance is selected as astopping criterion, the current total error is compared with the totalerror from the previous iteration. If the difference is within the errortolerance, process 900 exits. Otherwise, process 900 continues, loopsback to step 902 and performs another iteration.

[0117] K-Means Hierarchical Module

[0118] An exemplary flow diagram of a hierarchical K-Means process 1000is shown in FIG. 10. The hierarchical process builds a binary tree ofclusters. To find appropriate splits, the tree build calls the coreK-Means process 900. Process 1000 begins with step 1002, in which a rootnode that contains all training data in the buffer is created. In step1004, the nodes to be split are chosen. If a balanced tree is beingbuilt, the process splits on all nodes in a level if the resultingnumber of leaves does not exceed the maximum number of leaves (clusters)allowed. If splitting on all nodes in a level is not possible, the nodesare ranked by their dispersion and as many as possible are split withoutexceeding the maximum number of clusters allowed. If an unbalanced treeis being built, the node with the largest dispersion is split. If allnodes have zero dispersion (1 point per cluster), process 1000 exits.

[0119] In step 1006, for each node to be split, the K-Means process iscalled to split the data associated into two clusters. In step 1008,newly created clusters are updated using the core K-means process. Inparticular, the centroids and histograms of the clusters are updatedbased on the data that is assigned to each cluster. In addition, theerror (dispersion) and number of points may be updated.

[0120] In step 1012, all centroids and histograms are refined bytraining on all data records. That is, the core K-Means process is rerunwith all data points. In step 1014, steps 1004 to 1012 are repeateduntil the leaf node number becomes equal to the maximum number ofclusters. In step 1016, the parent centroids and histograms of the innernodes in the tree are corrected. The process starts at the leafnodes—adding the histograms and computing a new centroid for each parentnode. The process propagates up the tree until the root node is reached.

[0121] Final Histogram Generation

[0122] Once the clustering tree is constructed, in order to facilitaterule extraction, it is necessary to create histograms of the datarecords associated with each cluster. In order to achieve the bestpossible level of resolution, the original histograms produced by thedata summarization step are used.

[0123] The process starts at the tree leaves. All cells (as generated bythe summarization step) associated with a leaf contribute to a compositehistogram for each individual cluster. Then the leave histograms can beadded up to produce a parent histogram. This process continues until theroot leaf is reached.

[0124] The clustering model is persisted in two tables in the database.Extra information for rules and Naive Bayes models are also stored inthree tables. K-Means uses the Naive Bayes apply modules.

[0125] Orthogonal Partitioning Clustering (O-Cluster) Build Module

[0126] Description

[0127] The O-Cluster build module creates a hierarchical grid-basedclustering model. The resulting clusters define dense areas in theattribute space and are described by intervals along the attribute axesand the corresponding histograms for those intervals. These clusters aresubsequently used by the Rule and Naive Bayes generation modules. TheO-Cluster module can be also used in data summarization mode. When insummarization mode, O-Cluster produces ‘heavy’ data points thatrepresent areas in the attribute space. These points can be clustered bythe K-Means algorithm.

[0128] The objective of O-Cluster is to identify areas of high densityin the data and separate them into individual clusters. The algorithmlooks for splitting points along axis-parallel projections that wouldproduce cleanly separable and preferably balanced clusters. Thealgorithm operates recursively by creating a binary tree hierarchy. Thenumber of leaf clusters is determined automatically and does not need tobe specified in advance. The topology of the hierarchy, along with itssplitting predicates, can be used to gain insights into the clusteringsolution. The following sections describe the partitioning strategy usedwith numeric, categorical, and mixed values, outline the active samplingmethod employed by O-Cluster, and summarize the main processing stagesof the algorithm.

[0129] Numeric values

[0130] O-Cluster computes uni-dimensional histograms along individualinput attributes. For each histogram, O-Cluster attempts to find the‘best’ valid cutting plane, if any exist. A valid cutting plane passesthrough a bin of low density (a valley) in the histogram. Additionally,the bin of low density should have bins of high density (peaks) on eachside. O-Cluster attempts to find a pair of peaks with a valley betweenthem where the difference between the peak and valley histogram countsis statistically significant. Statistical significance is tested using astandard χ² test:

χ²=2(observed−expected)²÷expected≧χ_(a,1) ²,

[0131] where the observed value is equal to the histogram count of thevalley and the expected value is the average of the histogram counts ofthe valley and the lower peak. A 95% confidence level χ_(0.05,1) ²=3.843has been shown to produce reliable results. Since this test can producemultiple splitting points, O-Cluster chooses the one where the valleyhas the lowest histogram count and thus the cutting plane would gothrough the bin with lowest density. Alternatively, or in the case of atie, the algorithm can favor splitting points that would producebalanced partitions. It is sometimes desirable to prevent the separationof clusters with small peak density. This can be accomplished byintroducing a baseline sensitivity level that excludes peaks below thiscount. It should be noted that with numeric attributes, sensitivity (ρ)is an optional parameter that is used solely for filtering of thesplitting point candidates. Sensitivity is a parameter in the [0, 1]range that is inversely proportional to the minimum count required for ahistogram peak. A value of 0 corresponds to the global uniform level perattribute. The global uniform level reflects the average histogram countthat would have been observed if the data points in the buffer weredrawn from a uniform distribution. A value of 0.5 sets the minimumhistogram count for a peak to 50% of the global uniform level. A valueof 1 removes the restrictions on peak histogram counts and the splittingpoint identification relies solely on the χ² test. A default value of0.5 usually works satisfactorily. Referring briefly to FIG. 15, numericattribute splitting points identified in a one dimensional histogram isillustrated. This example shows the use of a sensitivity level 1502.

[0132] It is desirable to compute histograms that provide goodresolution but also have data artifacts smoothed out. O-Cluster isrobust with respect to different binning strategies as long as thehistograms do not significantly undersmooth or oversmooth thedistribution density. Data sets with low number of records would requirecoarser binning and some resolution may potentially be lost. Large datasets have the advantage of supporting the computation of detailedhistograms with good resolution.

[0133] Categorical Values

[0134] Categorical values do not have an intrinsic order associated withthem. Therefore it is impossible to apply the notion of histogram peaksand valleys as in the numeric case. The counts of individual values forma histogram and bins with large counts can be interpreted as regionswith high density. The clustering objective is to separate these highdensity areas and effectively decrease the entropy of the data.O-Cluster identifies the histogram with highest entropy among theindividual projections. For simplicity, we approximate the entropymeasure as the number of bins above sensitivity level p(as definedabove). O-Cluster places the two largest bins into separate partitions,thereby creating a splitting predicate. The remainder of the bins can beassigned randomly to the two resulting partitions. If these bins havelow counts, they would not be able to influence O-Cluster's solutionafter the split. The leaf clusters are described in terms of theirhistograms and/or modes and small bins are considered uninformative. Ifmore than two bins have high counts in a histogram, subsequent splitswould separate them into individual partitions. To avoid rapid datadecimation, O-Cluster creates a binary tree rather than one where largebins fan out into individual branches. The top down approach used byO-Cluster discovers co-occurrences of values and each leaf encodes densecells in a subspace defined by the splits in O-Cluster's hierarchy.Referring briefly to FIG. 16, a categorical attribute histogram isshown. The two largest bins (colored dark gray) will seed the two newpartitions. Again, the sensitivity level 1602 is shown.

[0135] When histograms are tied on the largest number of bins above thesensitivity level, O-Cluster favors the histogram where the top two binshave higher counts. Since the splits are binary, the optimal case wouldhave all the partition data points equally distributed between these twotop bins. We numerically quantify the suboptimality of the split as thedifference between the count of the lower of the two peaks and the countof half of the total number of points in the partition.

[0136] Mixed numeric and Categorical Values

[0137] O-Cluster searches for the ‘best’ splitting plane for numeric andcategorical attributes separately. Then it compares two measures ofdensity: histogram count of the valley bin in the numeric split and thesuboptimality of the categorical split. The algorithm chooses the splitwith lower density.

[0138] Active Sampling

[0139] O-Cluster uses an active sampling mechanism to handle databasesthat do not fit in memory. The algorithm operates on a data buffer of alimited size. After processing an initial random sample, O-Clusteridentifies data records that are of no further interest. Such recordsbelong to ‘frozen’ partitions where further splitting is highlyunlikely. These records are replaced with examples from ‘ambiguous’regions where further information (additional data points) is needed tofind good splitting planes and continue partitioning. A partition isconsidered ambiguous if a valid split can only be found at a lowerconfidence level. For a numeric attribute, if the difference between thelower peak and the valley is significant at the 90% level (χ_(0.1,1)²=2.706), but not at the default 95% level, the partition is consideredambiguous. Analogously, for a categorical attribute, if the counts of atleast two bins are above the sensitivity level but not to a significantdegree (at the default 95% confidence level), the partition is labeledambiguous.

[0140] Records associated with frozen partitions are marked for deletionfrom the buffer. They are replaced with records belonging to ambiguouspartitions. The histograms of the ambiguous partitions are updated andsplitting points are reevaluated.

[0141] An exemplary flow diagram of an O-Cluster process 1100 is shownin FIG. 11. Process 1100 begins with step 1102, in which data is loadedinto the buffer. If the entire data set does not fit in the buffer, arandom sample is used. O-Cluster process 1100 assigns all points fromthe initial buffer to a single active root partition. In step 1104,histograms are computed for the active partitions. The goal is tocompute histograms along the orthogonal unidimensional projections foreach active partition. Any partition that represents a leaf in theclustering hierarchy and is not explicitly marked ambiguous or ‘frozen’is considered active.

[0142] In step 1106, the best splitting points for the active partitionsare found. For each histogram, O-Cluster process 1100 attempts to findthe ‘best’ valid cutting plane, if any exist. The algorithm examinesseparately the groups of numeric and categorical attributes and selectsthe best splitting plane. In step 1108, ambiguous and frozen partitionsare flagged. If no valid splitting points are found in a partition,O-Cluster process 1100 checks whether the χ² test would have found avalid splitting point at a lower confidence level. If that is the case,the current partition is considered ambiguous. More data points areneeded to establish the quality of the splitting point. If no splittingpoints were found and there is no ambiguity, the partition can be markedas ‘frozen’ and the records associated with it marked for deletion fromthe buffer.

[0143] In step 1110, it is determined whether valid splitting points(separators) exist. If, in step 1110, it is determined that a validseparator exists, then in step 1112, the data points are split by thecutting plane, two new active partitions are created from the originalpartition, and process 1100 continues with step 1104. If, in step 1110,it is determined that no valid separators exist, then the processcontinues with step 1114, in which it is determined whether anyambiguous partitions exist. If, in step 1114, it is determined that noambiguous partitions exist, then process 1100 exits. If, in step 1114,it is determined that an ambiguous partition does exist, then process1100 continues with step 1116, in which it is determined whether anyunseen data exists. If, in step 1116, it is determined that no unseendata exists, then process 1100 exits. If, in step 1116, it is determinedthat unseen data exists, then process 1100 continues with step 1118, inwhich the buffer is reloaded. This step takes place after all recursivepartitioning on the current buffer is completed. If all existingpartitions are marked as ‘frozen’ (there are no ambiguous partitions)and/or there are no more data points available (no unseen data), thenprocess 1100 exits. Otherwise, if some partitions are marked asambiguous and additional unseen data records exist, process 1100 reloadsthe data buffer. The new data replace records belonging to ‘frozen’partitions. When new records are read in, only data points that fallinside ambiguous partitions are placed in the buffer. New recordsfalling within a ‘frozen’ partition are not loaded into the buffer andare discarded. If it is desirable to maintain statistics of the datapoints falling inside partitions (including the ‘frozen’ partitions),such statistics can be continuously updated with the reading of each newrecord. Loading of new records continues until either: 1) the buffer isfilled again; 2) the end of the data set is reached; or 3) a reasonablenumber of records (e.g., equal to the buffer size) have been read, evenif the buffer is not full and there are more data. The reason for thelast condition is that if the buffer is relatively large and there aremany points marked for deletion, it may take a long time to entirelyfill the buffer with data from the ambiguous regions. To avoid excessivereloading time under these circumstances, the buffer reloading processis terminated after reading through a number of records equal to thedata buffer size. Once the buffer reload is completed, process 1100continues with step 1104. Process 1100 requires, at most, a single passthrough the entire data set.

[0144] The result of the process 1100 is a tree structure where eachnode is defined by intervals along every dimension. The histogramswithin each interval describe the observed distribution.

[0145] Summarization

[0146] The summarization process is accomplished by building a tree tosummarize density of data in the data table. This may be done using anyclustering or tree building modeling algorithm, such as the standardO-Cluster process 1000. The tree is built in two stages:

[0147] a. Hierarchically cluster the data, from the top-down, toidentify regions of high density. These regions are mapped to the leavesof the tree.

[0148] b. If the number of leaves in the tree created in step a issmaller than the required number of summary points then, for each leafgenerated in the step a, further subdivide the leaf by constructingsubtrees in order to achieve one of the following goals:

[0149] i) Create a subtree with equi-density leaves.

[0150] ii) Mininize the overall variance or entropy of the subtree.

[0151] iii) Balance the two goals above.

[0152] For each of the leaves of the subtrees a summary is created. Thesummary information about the data in a leaf is computed based onstatistical properties (e.g., mean) for the data in the correspondingsubtree leaf.

[0153] When the O-Cluster module is called in summarization mode, it isexpected to produce summarized points (‘fat’ points) that would be usedby the K-Means algorithm. A ‘fat’ point is a data point that is used toreplace a collection of original similar data points. It has a count,which indicates the number of points it is replacing or summarizing.Clustering algorithms weight the contribution of each ‘fat’ point on thebasis of the magnitude of this count. The number of ‘fat’ points ispassed as the maximum number of clusters parameter. O-Cluster builds asubtree to minimize the variance/entropy within a frozen area. Thesubtree is grown in an unbalanced manner favoring partitions with largernumber of points. In order to produce the required number of ‘fat’points, O-Cluster further partitions the non-splittable/frozen, areas.The number of ‘fat’ points produced in a given frozen area isproportional to the fraction of the buffer associated with that area. Aprocess for summarization mode includes the following steps:

[0154] 1. Load buffer and follow the standard O-Cluster process 1000.Exit if the number of leaves becomes equal to the number of ‘fat’points.

[0155] 2. If more data needs to be loaded into the buffer and therequired number of ‘fat’ points has not been reached, compute whatfraction of the ‘fat’ points should be proportionally allocated to eachfrozen partition.

[0156] 3. For each frozen partition build a subtree. The subtree iscreated by partitioning along an attribute. If all attributes arenumeric then the attribute with the highest variance is selected. Fordata with categorical or a mix of numeric and categorical attributes,the attribute with the highest entropy is selected. The splitting pointis located in the middle of the range of populated bins. The leaf nodeto be split is chosen on the basis of a criterion weighting the varianceof the splitting attribute and the number of points belonging to theleaf. The subtree is grown until the required number of leaves (‘fat’points) is produced or each leaf becomes a single data point.

[0157] The O-Cluster model is persisted in two tables in the database.Extra information for rules and Naive Bayes model are also stored inthree tables. O-Cluster in summarization mode returns an array ofobjects from which the ‘fat’ points are extracted in the K-Means module.

[0158] O-Cluster uses the Naive Bayes apply modules.

[0159] Rule Generation Module

[0160] Description

[0161] This module extracts, for a group of clusters, a set of rulesfrom the information in the histograms of the clusters. The rule setdata is stored in a single table. This module is called from the Javastored procedure build function after all the clusters have beenidentified.

[0162] Processing

[0163] An exemplary flow diagram of a rule generation process 1200 isshown in FIG. 12. Process 1200 begins with step 1202, in which thecluster data is retrieved from the cluster table. In step 1204, for theroot node, the number of non-zero bins for each attribute histogram iscomputed and the number of records in the root cluster is obtained. Instep 1206, for each cluster, steps 1208 to 1224 are performed. In step1208, the number of records Cc assigned to the cluster is obtained.

[0164] In step 1210, for each attribute A and associated attributehistogram of each cluster, steps 1212 to 1220 are performed. In step1212, the average histogram height is computed for the non-zero binsH=Hs/B where B is the number of non-zero bins and Hs is the sum of theheights for the non-zero bins. In step 1214, the background level forthe attribute histogram is computed as: $\beta = \left\{ \begin{matrix}{1 - s} & {B = 0} \\\frac{\left( {1 - s} \right){\max \left( {1,{H - \sqrt{H - \chi^{2}}}} \right)}}{Cc} & {B > 0}\end{matrix} \right.$

[0165] where s is the sensitivity parameter.

[0166] In step 1216, the number of bins Bp with height above β iscomputed. In addition, the sum of bins Hp with height above β iscomputed and the attribute relevance AR is computed as:${AR} = \left\{ \begin{matrix}0 & {{Br} = 0} \\{1 - \frac{Bp}{Br}} & {{Br} > 0}\end{matrix} \right.$

[0167] where Br is the number of non-zero bins in the root node'shistogram or this attribute.

[0168] In step 1218, the rule antecedent element (predicate) for theattribute is generated. If the attribute is categorical, then thepredicate contains a list of all bins with height above β. For example,for a given cluster, a categorical attribute A with bins bin1, bin3, andbin4 above β would generate the following antecedent predicate: A IN(bin1, bin3, bin4). Otherwise, the predicate contains simple predicatesencoding the range of the bins with height above β. For example, for agiven cluster, a numerical attribute A with bins in the bin1 to bin2range above β would generate the following antecedent predicate: A>bin1AND A<=bin3.

[0169] In step 1220, the information for this attribute is stored. Instep 1222, the rule record count Cr is computed as: (the minimum Hp forall attributes )*Cc. In step 1224, the rule information is stored. Instep 1226, all cluster_rule objects are persisted to the named ruletable.

[0170] Probabilistic Model Generation Module

[0171] Description

[0172] This module extracts, for a group of clusters, a Naive Bayesmodel from the information in the histograms of the clusters. The NaiveBayes model data is persisted in two tables: the prior probability tableand the rules (or conditional probability) table. This module is calledfrom the Java stored procedure build function after all the clustershave been identified.

[0173] Processing

[0174] An exemplary flow diagram of a probabilistic model generationprocess 1300 is shown in FIG. 13. Process 1300 begins with step 1302, inwhich the cluster data is retrieved from the cluster table. In step1304, for the root node, the number of non-zero bins for each attributehistogram is computed and the number of records in the root cluster isobtained. In step 1306, for each cluster, steps 1308 to 1318 areperformed. In step 1308, the number of records Cc assigned to thecluster is obtained.

[0175] In step 1310, for each attribute A and associated attributehistogram of each cluster, steps 1312 to 1316 are performed. In step1312, the average histogram height is computed for the non-zero binsH=Hs/B where B is the number of non-zero bins and Hs is the sum of theheights for the non-zero bins.

[0176] In step 1314, the background level for the attribute histogram iscomputed as: $\beta = \left\{ \begin{matrix}{1 - s} & {B = 0} \\\frac{\left( {1 - s} \right){\max \left( {1,{H - \sqrt{H - \chi^{2}}}} \right)}}{Cc} & {B > 0}\end{matrix} \right.$

[0177] where s is the sensitivity parameter.

[0178] In step 1314, the conditional probabilities for the attribute arecomputed. If the attribute is categorical, then the process usesmultinomial distribution. To compute a multinomial distribution, the sumof bins Hp with height above β is computed. For each bin, if the binheight Hb is above a pre-defined small threshold (e.g., 10E-100), thenPc=max(ln(Hb/Hp)+k where Pc is the log conditional probability, and theconstant k is used to make it compatible with the Naïve Bayesimplementation. Otherwise, Pc=threshold value (e.g., −100ln(10)).

[0179] If the attribute is not categorical, then the process uses aGaussian distribution. To compute using a Gaussian distribution, themean μ and the variance σ² of the bin numbers for the bins with heightabove β is computed. For each bin the log conditional probability iscomputed as: ${Pc} = \left\{ \begin{matrix}{\ln \left( {{\frac{1}{\sqrt{2{\pi\sigma}}}{\exp \left( \frac{- \left( {b - \mu} \right)^{2}}{\sigma^{2}} \right)}} + k} \right)} & {{Hb} \geq \theta} \\{\ln (\theta)} & {{Hb} < 0}\end{matrix} \right.$

[0180] where b is the bin number of a bin, Hb is the bin height, and Tis a small threshold (e.g., 1E-100).

[0181] In step 1318, the number of records to be used for the clusterprior Cr is computed as (the minimum Hp for all attributes )*Cc. In step1320, the prior normalization factor Ct is computed as the sum of the Crfor all clusters. In step 1322, for each cluster, the log prior Pp forthose clusters where Cr>θ is computed as:${Pp} = {\ln \left( \frac{Cr}{Ct} \right)}$

[0182] In step 1324, the process persists the log prior probabilities toa prior probability table. In step 1326, the process persists the logconditional probabilities to a conditional probability table.

[0183] Exemplary Data Mining System

[0184] An exemplary block diagram of a data mining system 1400, in whichthe present invention may be implemented, is shown in FIG. 14. Datamining system 1400 is typically a programmed general-purpose computersystem, such as a personal computer, workstation, server system, andminicomputer or mainframe computer. Data mining system 1400 includes oneor more processors (CPUs) 1402A-1402N, input/output circuitry 1404,network adapter 1406, and memory 1408. CPUs 1402A-1402N execute programinstructions in order to carry out the functions of the presentinvention. Typically, CPUs 1402A- 1402N are one or more microprocessors,such as an INTEL PENTIUM® processor. FIG. 14 illustrates an embodimentin which data mining system 1400 is implemented as a singlemulti-processor computer system, in which multiple processors1402A-1402N share system resources, such as memory 1408, input/outputcircuitry 1404, and network adapter 1406. However, the present inventionalso contemplates embodiments in which data mining system 1400 isimplemented as a plurality of networked computer systems, which may besingle-processor computer systems, multi-processor computer systems, ora mix thereof.

[0185] Input/output circuitry 1404 provides the capability to input datato, or output data from, data mining system 1400. For example,input/output circuitry may include input devices, such as keyboards,mice, touchpads, trackballs, scanners, etc., output devices, such asvideo adapters, monitors, printers, etc., and input/output devices, suchas, modems, etc. Network adapter 1406 interfaces data mining system 1400with Internet/intranet 1410. Internet/intranet 1410 may include one ormore standard local area network (LAN) or wide area network (WAN), suchas Ethernet, Token Ring, the Internet, or a private or proprietaryLAN/WAN.

[0186] Memory 1408 stores program instructions that are executed by, anddata that are used and processed by, CPU 1402 to perform the functionsof data mining system 1400. Memory 1408 may include electronic memorydevices, such as random-access memory (RAM), read-only memory (ROM),programmable read-only memory (PROM), electrically erasable programmableread-only memory (EEPROM), flash memory, etc., and electromechanicalmemory, such as magnetic disk drives, tape drives, optical disk drives,etc., which may use an integrated drive electronics (IDE) interface, ora variation or enhancement thereof, such as enhanced IDE (EIDE) or ultradirect memory access (UDMA), or a small computer system interface (SCSI)based interface, or a variation or enhancement thereof, such asfast-SCSI, wide-SCSI, fast and wide-SCSI, etc, or a fiberchannel-arbitrated loop (FC-AL) interface.

[0187] In the example shown in FIG. 14, memory 1408 includes K-meansroutines 1412, O-Cluster routines 1414, mixture model routines 1420,probabilistic model generation module 1422, rule generation module 1424,model build data 1426, model apply data 1428, and operating system 1430.K-means routines 1412 include software modules to generate a clusteringmodel using the K-means clustering process. K-means routines 1412include, K-means core module 1434, and K-means hierarchical module 1436.K-means core module 1434 builds a center-based clustering model usingthe K-Means process. K-means hierarchical module 1436 builds a binarytree of clusters using K-means core module 1434.

[0188] O-Cluster routines 1414 includes software modules to generate aclustering model using the O-Cluster clustering process. O-Clusterroutines 1414 include O-Cluster build module 1438. O-Cluster buildmodule 1438 creates a hierarchical grid-based clustering model using theO-Cluster clustering process.

[0189] Mixture model routines 1420 include software modules to generatea clustering model using the mixture model clustering process. Mixturemodels attempt to approximate an input density with a fixed number ofcomponents density distributions. Probabilistic model generation module1422 extracts, for a group of clusters, a Naive Bayes model and a set ofrules from the information in the histograms of the clusters. Rulegeneration module 1424 extracts, for a group of clusters, a set of rulesfrom the information in the histograms of the clusters. Model build data1426 includes data that is used in the model build process. Model applydata 1428 includes data that is used in the model apply process.Operating system 1430 provides overall system functionality.

[0190] As shown in FIG. 14, the present invention contemplatesimplementation on a system or systems that provide multi-processor,multi-tasking, multi-process, and/or multi-thread computing, as well asimplementation on systems that provide only single processor, singlethread computing. Multi-processor computing involves performingcomputing using more than one processor. Multi-tasking computinginvolves performing computing using more than one operating system task.A task is an operating system concept that refers to the combination ofa program being executed and bookkeeping information used by theoperating system. Whenever a program is executed, the operating systemcreates a new task for it. The task is like an envelope for the programin that it identifies the program with a task number and attaches otherbookkeeping information to it. Many operating systems, including UNIX®,OS/2®, and WINDOWS®, are capable of running many tasks at the same timeand are called multitasking operating systems. Multi-tasking is theability of an operating system to execute more than one executable atthe same time. Each executable is running in its own address space,meaning that the executables have no way to share any of their memory.This has advantages, because it is impossible for any program to damagethe execution of any of the other programs running on the system.However, the programs have no way to exchange any information exceptthrough the operating system (or by reading files stored on the filesystem). Multi-process computing is similar to multi-tasking computing,as the terms task and process are often used interchangeably, althoughsome operating systems make a distinction between the two.

[0191] A preferred implementation of a data mining system including theclustering techniques described above involves the use of the JAVA®programming language.

[0192] It is important to note that while the present invention has beendescribed in the context of a fully functioning data processing system,those of ordinary skill in the art will appreciate that the processes ofthe present invention are capable of being distributed in the form of acomputer readable medium of instructions and a variety of forms and thatthe present invention applies equally regardless of the particular typeof signal bearing media actually used to carry out the distribution.Examples of computer readable media include recordable-type media suchas floppy disc, a hard disk drive, RAM, and CD-ROM's, as well astransmission-type media, such as digital and analog communicationslinks.

[0193] Although specific embodiments of the present invention have beendescribed, it will be understood by those of skill in the art that thereare other embodiments that are equivalent to the described embodiments.Accordingly, it is to be understood that the invention is not to belimited by the specific illustrated embodiments, but only by the scopeof the appended claims.

What is claimed is:
 1. A database management system for in-databaseclustering, comprising: a first data table and a second data table, eachdata table including a plurality of rows of data; means for building aclustering model using the first data table; means for building arule-based model using the clustering model; and means for applying therule-based model using the second data table to generate apply outputdata.
 2. The database management system of claim 1, wherein the meansfor building the rule-based model comprises: means for retrievingcluster data relating to a plurality of clusters; means for computing anumber of non-zero bins for each attribute histogram and obtaining anumber of records in a root cluster; means for generating a ruleantecedent element for each cluster of the plurality of clusters; meansfor computing a rule record count; and means for storing ruleinformation.
 3. The database management system of claim 2, wherein themeans for generating a rule antecedent element for each cluster of theplurality of clusters comprises: means for obtaining a number of recordsCc assigned to the cluster; and means for, for each attribute andassociated attribute histogram, computing a histogram height, computinga background level of the attribute histogram, computing a number ofbins, a sum of the bins, and an attribute relevance, and generating arule antecedent element for the attribute.
 4. The database managementsystem of claim 3, wherein the means for computing a histogram heightcomprises: means for computing an average histogram height for non-zerobins H=Hs/B, where B is a number of non-zero bins and Hs is a sum ofheights of histograms of the non-zero bins.
 5. The database managementsystem of claim 4, wherein the means for computing a background level ofthe attribute histogram comprises: means for computing the backgroundlevel β for the attribute histogram according to$\beta = \left\{ \begin{matrix}{1 - s} & {B = 0} \\{\frac{\left( {1 - s} \right){\max \left( {1,{H - \sqrt{H - \chi^{2}}}} \right)}}{Cc}\quad} & {B > 0}\end{matrix} \right.$

wherein s is a sensitivity parameter.
 6. The database management systemof claim 4, wherein the means for computing a number of bins, a sum ofthe bins, and an attribute relevance comprises: means for computing anumber of bins B_(p) having a height greater than the background levelβ; means for computing the sum of the bins Hp with height above β; andmeans for computing the attribute relevance AR according to:${AR} = \left\{ {\begin{matrix}0 & {{Br} = 0} \\{{1 - \frac{Bp}{Br}}\quad} & {{Br} > 0}\end{matrix}\quad,} \right.$

wherein Br is a number of non-zero bins in a histogram of the root nodeor the histogram of the attribute.
 7. The database management system ofclaim 6, wherein the means for generating a rule antecedent element forthe attribute comprises: means for generating a predicate containing alist of all bins having a height greater than β, if the attribute iscategorical; and means for generating a predicate encoding a range ofbins having a height greater than β, if the attribute isnon-categorical.
 8. A method for in-database clustering in a databasemanagement system, comprising the steps of: receiving a first data tableand a second data table, each data table including a plurality of rowsof data; building a clustering model using the first data table;building a rule-based model using the clustering model; and applying therule-based model using the second data table to generate apply outputdata.
 9. The method of claim 8, wherein the step of building therule-based model comprises: retrieving cluster data relating to aplurality of clusters; computing a number of non-zero bins for eachattribute histogram and obtaining a number of records in a root cluster;generating a rule antecedent element for each cluster of the pluralityof clusters; computing a rule record count; and storing ruleinformation.
 10. The method of claim 9, wherein the step of generating arule antecedent element for each cluster of the plurality of clusterscomprises: obtaining a number of records Cc assigned to the cluster; andmeans for, for each attribute and associated attribute histogram,computing a histogram height, computing a background level of theattribute histogram, computing a number of bins, a sum of the bins, andan attribute relevance, and generating a rule antecedent element for theattribute.
 11. The method of claim 10, wherein the step of computing ahistogram height comprises: computing an average histogram height fornon-zero bins H=Hs/B, where B is a number of non-zero bins and Hs is asum of heights of histograms of the non-zero bins.
 12. The method ofclaim 11, wherein the step of computing a background level of theattribute histogram comprises: computing the background level β for theattribute histogram according to $\beta = \left\{ \begin{matrix}{1 - s} & {B = 0} \\{\frac{\left( {1 - s} \right){\max \left( {1,{H - \sqrt{H - \chi^{2}}}} \right)}}{Cc}\quad} & {B > 0}\end{matrix} \right.$

wherein s is a sensitivity parameter.
 13. The method of claim 11,wherein the step of computing a number of bins, a sum of the bins, andan attribute relevance comprises: computing a number of bins B_(p)having a height greater than the background level β; computing the sumof the bins Hp with height above β; and computing the attributerelevance AR according to: ${AR} = \left\{ {\begin{matrix}0 & {{Br} = 0} \\{{1 - \frac{Bp}{Br}}\quad} & {{Br} > 0}\end{matrix}\quad,} \right.$

wherein Br is a number of non-zero bins in a histogram of the root nodeor the histogram of the attribute.
 14. The method of claim 13, whereinthe step of generating a rule antecedent element for the attributecomprises: generating a predicate containing a list of all bins having aheight greater than β, if the attribute is categorical; and generating apredicate encoding a range of bins having a height greater than β, ifthe attribute is non-categorical.
 15. A system for in-databaseclustering in a database management system, comprising: a processoroperable to execute computer program instructions; a memory operable tostore computer program instructions executable by the processor; andcomputer program instructions stored in the memory and executable toperform the steps of: receiving a first data table and a second datatable, each data table including a plurality of rows of data; building aclustering model using the first data table; building a rule-based modelusing the clustering model; and applying the rule-based model using thesecond data table to generate apply output data.
 16. The system of claim15, wherein the step of building the rule-based model comprises:retrieving cluster data relating to a plurality of clusters; computing anumber of non-zero bins for each attribute histogram and obtaining anumber of records in a root cluster; generating a rule antecedentelement for each cluster of the plurality of clusters; computing a rulerecord count; and storing rule information.
 17. The system of claim 16,wherein the step of generating a rule antecedent element for eachcluster of the plurality of clusters comprises: obtaining a number ofrecords Cc assigned to the cluster; and means for, for each attributeand associated attribute histogram, computing a histogram height,computing a background level of the attribute histogram, computing anumber of bins, a sum of the bins, and an attribute relevance, andgenerating a rule antecedent element for the attribute.
 18. The systemof claim 17, wherein the step of computing a histogram height comprises:computing an average histogram height for non-zero bins H=Hs/B, where Bis a number of non-zero bins and Hs is a sum of heights of histograms ofthe non-zero bins.
 19. The system of claim 18, wherein the step ofcomputing a background level of the attribute histogram comprises:computing the background level β for the attribute histogram accordingto $\beta = \left\{ \begin{matrix}{1 - s} & {B = 0} \\{\frac{\left( {1 - s} \right){\max \left( {1,{H - \sqrt{H - \chi^{2}}}} \right)}}{Cc}\quad} & {B > 0}\end{matrix} \right.$

wherein s is a sensitivity parameter.
 20. The system of claim 18,wherein the step of computing a number of bins, a sum of the bins, andan attribute relevance comprises: computing a number of bins B_(p)having a height greater than the background level β; computing the sumof the bins Hp with height above β; and computing the attributerelevance AR according to: ${AR} = \left\{ {\begin{matrix}0 & {{Br} = 0} \\{{1 - \frac{Bp}{Br}}\quad} & {{Br} > 0}\end{matrix}\quad,} \right.$

wherein Br is a number of non-zero bins in a histogram of the root nodeor the histogram of the attribute.
 21. The system of claim 20, whereinthe step of generating a rule antecedent element for the attributecomprises: generating a predicate containing a list of all bins having aheight greater than β, if the attribute is categorical; and generating apredicate encoding a range of bins having a height greater than β, ifthe attribute is non-categorical.
 22. A computer program product forin-database clustering in a database management system, comprising: acomputer readable medium; computer program instructions, recorded on thecomputer readable medium, executable by a processor, for performing thesteps of: receiving a first data table and a second data table, eachdata table including a plurality of rows of data; building a clusteringmodel using the first data table; building a rule-based model using theclustering model; and applying the rule-based model using the seconddata table to generate apply output data.
 23. The computer programproduct of claim 22, wherein the step of building the rule-based modelcomprises: retrieving cluster data relating to a plurality of clusters;computing a number of non-zero bins for each attribute histogram andobtaining a number of records in a root cluster; generating a ruleantecedent element for each cluster of the plurality of clusters;computing a rule record count; and storing rule information.
 24. Thecomputer program product of claim 23, wherein the step of generating arule antecedent element for each cluster of the plurality of clusterscomprises: obtaining a number of records Cc assigned to the cluster; andmeans for, for each attribute and associated attribute histogram,computing a histogram height, computing a background level of theattribute histogram, computing a number of bins, a sum of the bins, andan attribute relevance, and generating a rule antecedent element for theattribute.
 25. The computer program product of claim 24, wherein thestep of computing a histogram height comprises: computing an averagehistogram height for non-zero bins H=Hs/B, where B is a number ofnon-zero bins and Hs is a sum of heights of histograms of the non-zerobins.
 26. The computer program product of claim 25, wherein the step ofcomputing a background level of the attribute histogram comprises:computing the background level i for the attribute histogram accordingto $\beta = \left\{ \begin{matrix}{1 - s} & {B = 0} \\{\frac{\left( {1 - s} \right){\max \left( {1,{H - \sqrt{H - \chi^{2}}}} \right)}}{Cc}\quad} & {B > 0}\end{matrix} \right.$

wherein s is a sensitivity parameter.
 27. The computer program productof claim 25, wherein the step of computing a number of bins, a sum ofthe bins, and an attribute relevance comprises: computing a number ofbins B_(p) having a height greater than the background level β;computing the sum of the bins Hp with height above β; and computing theattribute relevance AR according to: ${AR} = \left\{ {\begin{matrix}0 & {{Br} = 0} \\{{1 - \frac{Bp}{Br}}\quad} & {{Br} > 0}\end{matrix}\quad,} \right.$

wherein Br is a number of non-zero bins in a histogram of the root nodeor the histogram of the attribute.
 28. The computer program product ofclaim 27, wherein the step of generating a rule antecedent element forthe attribute comprises: generating a predicate containing a list of allbins having a height greater than β, if the attribute is categorical;and generating a predicate encoding a range of bins having a heightgreater than β, if the attribute is non-categorical.